On demand routing mesh for dynamically adjusting SD-WAN edge forwarding node roles to facilitate routing through an SD-WAN

ABSTRACT

Some embodiments of the invention provide a method of facilitating routing through a software-defined wide area network (SD-WAN) defined for an entity. A first edge forwarding node located at a first multi-machine site of the entity, the first multi-machine site at a first physical location and including a first set of machines, serves as an edge forwarding node for the first set of machines by forwarding packets between the first set of machines and other machines associated with the entity via other forwarding nodes in the SD-WAN. The first edge forwarding node receives configuration data specifying for the first edge forwarding node to serve as a hub forwarding node for forwarding a set of packets from a second set of machines associated with the entity and operating at a second multi-machine site at a second physical location to a third set of machines associated with the entity and operating at a third multi-machine site at a third physical location. The first edge forwarding node serves as a hub forwarding node to forward the set of packets from the second set of machines to the third set of machines.

BACKGROUND

Today, software defined wide area networks (SD-WANs) provide secure access to applications hosted on clouds as well as enterprise datacenters. Typical SD-WAN deployments require a transit node through which the application flows in order to reach destinations (e.g., a cloud application involves branch-to-branch flows via gateways). However, certain challenges arise when handling critical application traffic, such as path impairments between source edge nodes and transit nodes, which can lead to application degradation. Additionally, critical applications that are of SOS nature are also subject to path instabilities and can end up with black out or brown out scenarios that lead to undesirable outcomes.

BRIEF SUMMARY

Some embodiments of the invention provide a method of routing packets through a software-defined wide area network (SD-WAN) defined for an entity. A first edge forwarding node, located at a first multi-machine site of the entity that is located at a first physical location and includes a first set of machines, serves as an edge forwarding node for the first set of machines by forwarding packets between the first set of machines and other machines associated with the entity via other forwarding nodes in the SD-WAN. The first edge forwarding node receives configuration data specifying for the first edge forwarding node to serve as a hub forwarding node for forwarding a set of packets from a second set of machines associated with the entity and operating at a second multi-machine site at a second physical location to a third set of machines associated with the entity and operating at a third multi-machine site at a third physical location. The first edge forwarding node then serves as a hub forwarding node to forward the set of packets to the third set of machines at the third multi-machine site.

In some embodiments, the first edge forwarding node receives the set of packets from the second edge forwarding node through a first tunnel between the first and second edge forwarding nodes, and forwards the packets to their next hop on their way to their destination via a second tunnel between the first edge forwarding node and the next hop. Before forwarding the set of packets through the second tunnel, in some embodiments, the first edge forwarding node removes a first tunnel header identified associated with the first tunnel and inserts a second tunnel header identifier associated with the second tunnel. In some embodiments, the first and second tunnels are secure tunnels (e.g., virtual private network (VPN) tunnels).

In some embodiments, the configuration data is received by the first edge forwarding node from a controller of the SD-WAN. The controller in some embodiments is a centralized controller, while in other embodiments it is a distributed controller with controller agents executing on devices in the SD-WAN (e.g., on the forwarding nodes), while in still other embodiments, the controller is a cloud gateway that performs the functionalities of a controller. Also, in some embodiments, the controller and the cloud gateway share controller functionalities.

The configuration data in some embodiments includes route records specifying multiple sets of routes in which the first edge forwarding node serves as just and edge forwarding element for the first multi-machine site and in which the first edge forwarding node serves as a hub forwarding element for other multi-machine sites, such as the second multi-machine site. In some embodiments, the controller provides different route records specifying different subsets of routes to different edge forwarding nodes in the SD-WAN.

The route records, in some embodiments, are generated by the controller based on routes identified in a routing graph (e.g., a routing-mesh topology model) generated by the controller that shows connections between forwarding nodes in the SD-WAN. In some embodiments, the controller uses the generated routing graph to identify edge forwarding nodes that can serve as hub forwarding nodes for the SD-WAN in order to provide alternate routes between source and destination forwarding nodes when the source forwarding nodes experience certain conditions while forwarding packets to other sites. For example, a particular forwarding node may be unable to connect to a hub forwarding node due to link degradation, congestion at the hub forwarding node because of another tenant, etc., according to some embodiments. In another example, the controller (or cloud gateway) in some embodiments can detect these conditions by pinging (e.g., sending ICMP messages) a hub forwarding node or set of hub forwarding nodes and detecting a slow response. In some embodiments, the controller provides the route records to the edge forwarding nodes proactively in order to allow the edge forwarding nodes to quickly react when experiencing the certain conditions. Alternatively, or conjunctively, the controller in some embodiments provides the route records reactively after detecting (e.g., by receiving a notification from the forwarding nodes) that a particular forwarding node is experiencing the certain conditions.

The conditions, in some embodiments, relate to a degraded operating state of hub forwarding nodes (i.e., transit nodes) and are associated with specified threshold values. In some embodiments, the degraded operating state of a hub forwarding node is caused by degradation of performance attributes such as latency, bandwidth, and throughput. The conditions and their associated threshold values are defined as policy-based routing (PBR) rules that are distributed to the forwarding nodes by the controller, according to some embodiments. In some embodiments, the forwarding nodes include metric generators for generating metrics to resolve these PBR rules and select alternate routes.

In some embodiments, each edge forwarding node in the SD-WAN is associated with a set of SD-WAN profiles that each identify shared sets of parameters. For example, an SD-WAN profile can identify a shared set of security parameters, service parameters, and/or policy parameters, in some embodiments. The controller, in some embodiments, uses these SD-WAN profiles while performing path searches on the routing graph to identify edge forwarding nodes in the routing graph that can serve in a secondary role as a hub forwarding node for the SD-WAN.

In some embodiments, the controller uses the routing graph to compute costs associated with multiple different paths through the routing graph. The computed costs, in some embodiments are link weight scores (i.e., cost scores) computed for different links between forwarding nodes in the routing graph. The weight scores, in some embodiments, are computed as weighted combinations of several computed and provide-specific values, such as a link's (1) computed delay value, (2) computed loss value, (3) provider network-connection cost, and (4) provider compute cost. In some embodiments, different links can have more than one associated cost. For example, the link cost associated with using an edge forwarding node in its primary role as an edge forwarding node is less than the link cost associated with using the edge forwarding node in its secondary role as a hub forwarding node, in some embodiments. The PBR rules used by the forwarding nodes are defined based on the computed weight scores, according to some embodiments (e.g., when latency is greater than N ms, use higher cost link).

The routing graph, in some embodiments, is a set of routing graphs that includes at least a first routing graph that does not include a direct link between the particular edge forwarding node and any edge forwarding node in a group of edge forwarding nodes associated with the entity, and at least a second routing graph that does include direct links between these edge forwarding nodes. In some embodiments, in order to identify edge forwarding nodes that can serve as hub forwarding nodes for the SD-WAN, the controller determines which routing graph results in better routing metrics than each of the other routing graphs in the set.

In some embodiments, in order to serve as a hub forwarding node to send the set of packets from the second set of machines to the third set of machines, the first edge forwarding node receives the packets from a second edge forwarding node of the second site through a first tunnel established between the first and second sites, and forwards the packets to a third edge forwarding node at the third site through a second tunnel between the first and third sites. In some embodiments, prior to forwarding the packets through the second tunnel, the first edge forwarding node removes from the packets a first tunnel header identifier associated with the first tunnel, inserts a second tunnel header identifier that is associated with the second tunnel, and forwards the packets to the third edge forwarding node.

The first edge forwarding node, in some embodiments, serves as the hub forwarding node for only a temporary period of time in order to forward the set of packets. In some embodiments, the first edge forwarding node does not continue to serve as a hub forwarding node for other communication sessions between the second and third sets of machines at the second and third sites, while in other embodiments, the first edge forwarding node serves as a hub forwarding node for all or some communication sessions between the second and third sites, as well as for potentially other sites of the entity.

In some embodiments, the first, second, and third edge forwarding nodes serve as spoke nodes in a hub-spoke architecture that uses a designated hub forwarding node located at a datacenter site associated with the entity. Accordingly, after the first edge forwarding node starts to operate as a hub forwarding node for the second site, in some embodiments, the SD-WAN has two hubs that include the first hub at the first multi-machine site (e.g., also referred to herein as a multi-user compute site) for the second multi-machine site and the second hub at the datacenter site for multiple edge forwarding nodes at multiple multi-machine sites of the entity. In some embodiments, the first edge forwarding node serves as hub forwarding node for a particular multi-machine site of the entity that establishes multiple tunnels with the first edge forwarding node, each tunnel used for a communication session between a machine at the particular multi-machine site and a machine at another multi-machine site of the entity.

The first multi-machine site of the entity, in some embodiments, is a first branch site of multiple branch sites of the entity, in some embodiments, and the first physical location is one of multiple geographically dispersed physical locations. Branch sites (e.g., multi-user compute sites), in some embodiments, are locations that have multiple user computes and/or other user-operated devices and serve as source computers and devices for communicating with other computers and devices at other sites (e.g., other branch sites, datacenter sites, etc.). The branch sites, in some embodiments, can also include servers that are not operated by users. In some embodiments, the second multi-machine site is a multi-tenant datacenter, such as a Software as a Service (SaaS) provider's datacenter. When the multi-tenant datacenter is a SaaS provider's datacenter, in some embodiments, the second edge forwarding node is a multi-tenant gateway forwarding node.

In some embodiments, the edge forwarding nodes associated with the SD-WAN can include an edge forwarding node associated with a branch site of the SD-WAN, a gateway forwarding node for a private datacenter, a multi-tenant gateway forwarding node associated with a public cloud, a multi-tenant gateway forwarding node associated with a SaaS provider cloud, and a hub forwarding node that provides connectivity between spoke edge forwarding nodes in the hub-and-spoke configuration of the SD-WAN.

The preceding Summary is intended to serve as a brief introduction to some embodiments of the invention. It is not meant to be an introduction or overview of all inventive subject matter disclosed in this document. The Detailed Description that follows and the Drawings that are referred to in the Detailed Description will further describe the embodiments described in the Summary as well as other embodiments. Accordingly, to understand all the embodiments described by this document, a full review of the Summary, the Detailed Description, the Drawings, and the Claims is needed. Moreover, the claimed subject matters are not to be limited by the illustrative details in the Summary, the Detailed Description, and the Drawings.

BRIEF DESCRIPTION OF FIGURES

The novel features of the invention are set forth in the appended claims. However, for purposes of explanation, several embodiments of the invention are set forth in the following figures.

FIG. 1 illustrates an example of a virtual network that is created for a particular entity using a hub that is deployed in a public cloud datacenter of a public cloud provider, according to some embodiments.

FIG. 2 illustrates an example of a virtual network in which a particular edge forwarding node has been designated as a hub forwarding node to facilitate a communications session between two edge forwarding nodes, according to some embodiments.

FIG. 3 illustrates a process performed by a forwarding node in a virtual network when attempting to establish a communications session with a particular destination, according to some embodiments.

FIG. 4 illustrates a process performed by an edge forwarding node at a branch site, in some embodiments, when attempting to establish communications with a destination.

FIG. 5 illustrates an example of a virtual network in which a particular edge forwarding node has been designated as a hub forwarding node to facilitate a communications session between a particular edge forwarding node and a SaaS datacenter, according to some embodiments.

FIG. 6 illustrates a process performed by a forwarding node in a virtual network that acts as a hub forwarding node to facilitate a communications session between a particular source and a particular destination, according to some embodiments.

FIG. 7 illustrates an example of a virtual network in which a particular edge forwarding node has been designated as a hub forwarding node for other edge forwarding nodes in the virtual network, according to some embodiments.

FIG. 8 illustrates a process performed by a controller or controller cluster in a virtual network to identify potential edge forwarding nodes able to serve as hub forwarding nodes to provide optimal routing for other forwarding nodes in the virtual network, according to some embodiments.

FIG. 9 illustrates an example in which a particular edge forwarding node in a first SD-WAN has been designated as a hub forwarding node to facilitate a communications session between another edge forwarding node in the first SD-WAN and an edge forwarding node in a second SD-WAN, according to some embodiments.

FIG. 10 illustrates a process performed by a controller or controller cluster in a virtual network to identify potential edge forwarding nodes able to serve as hub forwarding nodes to provide optimal routing for other forwarding nodes in the virtual network in response to detected failed communications attempts by another forwarding node in the virtual network, according to some embodiments.

FIGS. 11A-11G illustrate an example of a routing graph generated by a controller to identify all possible routes between a source and destination, according to some embodiments.

FIG. 12 illustrates an example of two routing graphs generated for an SD-WAN that treat one edge node differently.

FIG. 13 conceptually illustrates a computer system with which some embodiments of the invention are implemented.

DETAILED DESCRIPTION

In the following detailed description of the invention, numerous details, examples, and embodiments of the invention are set forth and described. However, it will be clear and apparent to one skilled in the art that the invention is not limited to the embodiments set forth and that the invention may be practiced without some of the specific details and examples discussed.

Some embodiments of the invention provide a method of routing packets through a software-defined wide area network (SD-WAN) defined for an entity by augmenting the roles of SD-WAN devices. Examples of roles for SD-WAN devices include SD-WAN edge forwarding nodes, SD-WAN hub forwarding nodes, and SD-WAN gateway forwarding nodes. In some embodiments, an SD-WAN device's role can include a primary function and a secondary function, where the secondary function is either always there, or requested on demand. In some embodiments, these roles are based on context. For example, a controller or controller cluster in some embodiments can associate SD-WAN forwarding nodes with heuristic metrics, such as geolocation, number of paths to a hub, path metrics, etc.

In its primary function in its role as an edge forwarding node, for example, a first SD-WAN edge forwarding node that is located at a first multi-machine site (e.g., also referred to herein as a multi-user compute site) of an entity that is located at a first physical location and includes a first set of machines, can forward packets from the first set of machines operating at the first multi-machine site to other forwarding nodes in the SD-WAN for forwarding to other machines associated with the entity. Based on configuration data (i.e., route records) from the controller, the first SD-WAN edge forwarding node can subsequently operate in its secondary function as a hub for the second multi-machine site and relay the set of packets from the second set of machines operating at the second multi-machine site to a third set of machines associated with the entity.

FIG. 1 illustrates an example of a virtual network 100 that is created for a particular entity using SD-WAN forwarding elements deployed at branch sites, datacenters, and public clouds. Examples of public clouds are public clouds provided by Amazon Web Services (AWS), Google Cloud Platform (GCP), Microsoft Azure, etc., while examples of entities include a company (e.g., corporation, partnership, etc.), an organization (e.g., a school, a non-profit, a government entity, etc.), etc.

In FIG. 1, the SD-WAN forwarding elements include cloud gateway 105 and SD-WAN forwarding elements 130, 132, 134, 136. The cloud gateway (CGW) in some embodiments is a forwarding element that is in a private or public datacenter 110. The CGW 105 in some embodiments has secure connection links (e.g., tunnels) with edge forwarding elements (e.g., SD-WAN edge forwarding elements (FEs) 130, 132, 134, and 136) at the particular entity's multi-machine sites (e.g., SD-WAN edge sites 120, 122, and 124), such as multi-user compute sites (e.g., branch offices or other physical locations having multi user computers and other user-operated devices and serving as source computers and devices for requests to other machines at other sites), datacenters (e.g., locations housing servers), etc. These multi-machine sites are often at different physical locations (e.g., different buildings, different cities, different states, etc.).

Four multi-machine sites 120-126 are illustrated in FIG. 1, with three of them being branch sites 120-124, and one being a datacenter 126. Each branch site is shown to include an edge forwarding node 130-134, while the datacenter site 126 is shown to include a hub forwarding node 136. The datacenter SD-WAN forwarding node 136 is referred to as a hub node because in some embodiments this forwarding node can be used to connect to other edge forwarding nodes of the branch sites 120-124. The hub node in some embodiments uses or has one or more service engines to perform services (e.g., middlebox services) on packets that it forwards from one branch site to another branch site. In some embodiments, when an edge forwarding node takes on the role of a hub forwarding node (e.g., based on route records provided by the controller cluster), the controller cluster provides service rules to the edge forwarding node to enable this node, or a service engine used by this node, to perform service operations that are to be performed by the hub forwarding node. The hub node also provides access to the datacenter resources 156, as further described below.

Each edge forwarding element (e.g., SD-WAN edge FEs 130-134) exchanges packets with one or more cloud gateways 105 through one or more connection links 115 (e.g., multiple connection links available at the edge forwarding element). In some embodiments, these connection links include secure and unsecure connection links, while in other embodiments they only include secure connection links. As shown by edge node 134 and gateway 105, multiple secure connection links (e.g., multiple secure tunnels that are established over multiple physical links) can be established between one edge node and a gateway.

When multiple such links are defined between an edge node and a gateway, each secure connection link in some embodiments is associated with a different physical network link between the edge node and an external network. For instance, to access external networks, an edge node in some embodiments has one or more commercial broadband Internet links (e.g., a cable modem, a fiber optic link) to access the Internet, an MPLS (multiprotocol label switching) link to access external networks through an MPLS provider's network, a wireless cellular link (e.g., a 5G LTE network), etc. In some embodiments, the different physical links between the edge node 134 and the cloud gateway 105 are the same type of links (e.g., are different MPLS links).

In some embodiments, one edge forwarding node 130-134 can also have multiple direct links 115 (e.g., secure connection links established through multiple physical links) to another edge forwarding node 130-134, and/or to a datacenter hub node 136. Again, the different links in some embodiments can use different types of physical links or the same type of physical links. Also, in some embodiments, a first edge forwarding node of a first branch site can connect to a second edge forwarding node of a second branch site (1) directly through one or more links 115, (2) through a cloud gateway or datacenter hub to which the first edge forwarding node connects through two or more links 115, or (3) through another edge forwarding node of another branch site that can augment its role to that of a hub forwarding node, as will be described in more detail below. Hence, in some embodiments, a first edge forwarding node (e.g., 134) of a first branch site (e.g., 124) can use multiple SD-WAN links 115 to reach a second edge forwarding node (e.g., 130) of a second branch site (e.g., 120), or a hub forwarding node 136 of a datacenter site 126.

The cloud gateway 105 in some embodiments is used to connect two SD-WAN forwarding nodes 130-136 through at least two secure connection links 115 between the gateway 105 and the two forwarding elements at the two SD-WAN sites (e.g., branch sites 120-124 or datacenter site 126). In some embodiments, the cloud gateway 105 also provides network data from one multi-machine site to another multi-machine site (e.g., provides the accessible subnets of one site to another site). Like the cloud gateway 105, the hub forwarding element 136 of the datacenter 126 in some embodiments can be used to connect two SD-WAN forwarding nodes 130-134 of two branch sites through at least two secure connection links 115 between the hub 136 and the two forwarding elements at the two branch sites 120-124.

In some embodiments, each secure connection link between two SD-WAN forwarding nodes (i.e., CGW 105 and edge forwarding nodes 130-136) is formed as a VPN tunnel between the two forwarding nodes. In this example, the collection of the SD-WAN forwarding nodes (e.g., forwarding elements 130-136 and gateways 105) and the secure connections 115 between the forwarding nodes forms the virtual network 100 for the particular entity that spans at least the public or private cloud datacenter 110 to connect the branch and datacenter sites 120-126.

In some embodiments, secure connection links are defined between gateways in different public cloud datacenters to allow paths through the virtual network to traverse from one public cloud datacenter to another, while no such links are defined in other embodiments. Also, in some embodiments, the gateway 105 is a multi-tenant gateway that is used to define other virtual networks for other entities (e.g., other companies, organizations, etc.). Some such embodiments use tenant identifiers to create tunnels between a gateway and edge forwarding element of a particular entity, and then use tunnel identifiers of the created tunnels to allow the gateway to differentiate packet flows that it receives from edge forwarding elements of one entity from packet flows that it receives along other tunnels of other entities. In other embodiments, gateways are single-tenant and are specifically deployed to be used by just one entity.

FIG. 1 illustrates a cluster of controllers 140 that serve as a central point for managing (e.g., defining and modifying) configuration data that is provided to the edge nodes and/or gateways to configure some or all of the operations. In some embodiments, this controller cluster 140 is in one or more public cloud datacenters, while in other embodiments it is in one or more private datacenters. In some embodiments, the controller cluster 140 has a set of manager servers that define and modify the configuration data, and a set of controller servers that distribute the configuration data to the edge forwarding elements (FEs), hubs and/or gateways. In some embodiments, the controller cluster 140 directs edge forwarding elements and hubs to use certain gateways (i.e., assigns a gateway to the edge forwarding elements and hubs). In some embodiments, some or all of the controller cluster's functionality is performed by a cloud gateway (e.g., cloud gateway 105).

The controller cluster 140 also provides next hop forwarding rules and load balancing criteria in some embodiments. As mentioned above, the controller cluster 140 also provides service rules to edge forwarding nodes that can serve as hub forwarding nodes, in some embodiments, in order to enable these nodes, or service engines used by these nodes, to perform service operations on the packets that are to be performed by the hub forwarding node. In some embodiments, the controller cluster provides the configuration data (e.g., route records, forwarding rules, etc.) to the edge forwarding nodes proactively in order to allow the edge forwarding nodes to quickly react when experiencing certain conditions that necessitate using alternate routes. Alternatively, or conjunctively, the controller in some embodiments provides the configuration data reactively after detecting (e.g., by receiving a notification from the forwarding nodes) that a particular forwarding node is experiencing the certain conditions.

The conditions, in some embodiments, relate to degraded operational states of hub forwarding nodes and are associated with threshold values defined in the forwarding rules (e.g., policy-based routing (PBR) rules). In some embodiments, the degraded operational states of hub forwarding nodes can be due to issues with latency, bandwidth, and/or throughput. For example, a forwarding rule may specify that a first edge forwarding node at a first site should use a second edge forwarding node at a second site to forwarding a set of packets to a third site when the throughput of a designated hub forwarding node used by the first edge forwarding node does not fall within a threshold value range defined in the forwarding rule.

In some embodiments, the controller detects the degraded operational state of the hub forwarding node and signals to the first edge forwarding node to use an alternate route through the second edge forwarding node, while in other embodiments, the first edge forwarding node automatically uses the second edge forwarding node as a hub according to the route records. FIGS. 3, 4, 6, 8, and 10 illustrate processes for facilitating routing by designating edge forwarding nodes as hub forwarding nodes in some embodiments, and will be described below with reference to FIGS. 2, 5, 7, and 9.

FIG. 2 illustrates another example of a virtual network 200 in some embodiments that is created for a particular entity using SD-WAN forwarding elements deployed at branch sites, datacenters, and public clouds. Like the virtual network 100, the SD-WAN forwarding elements of the virtual network 200 include SD-WAN edge forwarding nodes 230-234, cloud gateway 205, and SD-WAN hub forwarding node 236. The cloud gateway 205 in some embodiments is a forwarding element that is in a private or public datacenter 210. In some embodiments, the cloud gateway 205 has secure connection links (e.g., tunnels) with edge forwarding elements at the entity's different branch sites and datacenters. In this example, the edge forwarding nodes 230-234 are located at respective branch sites 220-224, while the hub forwarding node 236 is located at the datacenter 226.

While the cloud gateway 105 and hub forwarding node 236 can provide forwarding services for the branch sites 220-224, in some embodiments, these connections experience issues sometimes caused by heavy traffic loads coming from other sites in the SD-WAN. Accordingly, the edge forwarding nodes 230-234 in some embodiments are requested or instructed to serve as hub forwarding nodes to facilitate communication sessions between other sites in the SD-WAN.

FIG. 3 illustrates a process performed by an edge forwarding node at a branch site, in some embodiments, when attempting to establish communications with a destination (e.g., any destination device based on routing). The process 300 starts, at 305, by attempting to establish a communications session with a particular forwarding node at a particular site via one or more hubs or gateways. For example, in the virtual network 200, the edge forward node 230 at the branch site 220 can attempt to communicate with the edge forwarding node 232 at the branch site 222 through the cloud gateway 205 and the hub forwarding node 236 via connection link 260.

Next, at 310, the edge forwarding node determines whether the attempt to establish the communications session failed. In some embodiments, for example, when a different branch site of the same or different entity/tenant is sending large amounts of data via the hub or gateway forwarding nodes, the connections (e.g., links) with other branch sites become less reliable (i.e., degraded). Also, in some embodiments, the attempts to connect fail because the hub or gateway forwarding nodes may be experiencing scheduled or unscheduled downtime (e.g., for maintenance).

When the edge forwarding node determines at 310 that the attempt did not fail, the process transitions to 315 to send communications (i.e., packets) via the successful route. The process then ends. Otherwise, when the edge forwarding node determines at 310 that the attempt did fail, the process transitions to 320 to determine whether a threshold number of attempts has been exceeded. In some embodiments, the threshold number of attempts is predefined by a user (e.g., network administrator), and implemented as a fault tolerance policy, or as a PBR rule, as will be described below for FIG. 4.

When the edge forwarding node determines that the threshold of failed attempts has not been exceeded, the process returns to 305 to continue to attempt to establish the communications session via hub and gateway forwarding nodes. Alternatively, when the edge forwarding node determines at 320 that the threshold number of failed attempts has been exceed, the process transitions to 325 to establish a communications session with an intervening edge forwarding node at another branch site. For example, the edge forwarding node 230 can establish a communications session with the edge forwarding node 234 serving as a hub for a communications session between the edge forwarding node 230 and the edge forwarding node 232.

Next, at 330, the edge forwarding node starts forwarding packets to the intervening edge forwarding node, which is now serving as a hub forwarding node, for delivery to the particular forwarding node at the particular site. For example, in the virtual network 200, the edge forwarding node 230 is shown sending packets 275 along the route 270, which passes through the edge forwarding node 234 for delivery to the edge forwarding node 232. The process then ends.

FIG. 4 illustrates another process performed by an edge forwarding node at a branch site, in some embodiments, when attempting to establish communications with a destination (e.g., any destination device based on routing). The process 400 starts, at 410, when the edge forwarding node of a branch site receives a packet (e.g., from a source machine at the branch site) for forwarding to a second site through the SD-WAN.

Next, the process identifies, at 420, a set of one or more PBR rules that are applicable to the packet and that identify two next hops for two routes to the destination, with one route using a designated hub forwarding node at a datacenter site and the other route using another edge forwarding node at another site. In some embodiments, the edge forwarding node identifies applicable PBR rules based on five tuple identifiers (e.g., source and destination address, source and destination port number, and protocol) associated with the packet, as well as based on performance attributes of the designated hub forwarding node (e.g., latency, bandwidth, and throughput).

After identifying the set of PBR rules, the process evaluates, at 430, a condition specified by the set of PBR rules to select one of the next hops identified by the set of PBR rules. For example, the PBR rules, in some embodiments, specify threshold values for the performance attributes. For example, a PBR rule may specify that when the designated hub forwarding node has a latency greater than N ms, the other edge forwarding node serving as a hub forwarding node should be the next hop for forwarding the packet. In another example, a PBR rule may specify that when the edge forwarding node experiences greater than N number of failed attempts to connect to the designated hub forwarding node, the other edge forwarding node serving as a hub forwarding node should be the next hop for forwarding the packet. The process then forwards, at 440, the received packet along to the selected next hop. Following 440, the process 400 ends.

FIG. 5 illustrates a virtual network 500 that includes a controller cluster 540, multiple branch sites (e.g., 520, 522, and 524), each branch site having a respective SD-WAN edge forwarding node (e.g., 530, 532, and 534) and a set of resources (e.g., 550, 552, and 554). The virtual network 500 also includes a datacenter 528 (public or private) with resources 558 and an SD-WAN hub forwarding node 538, a cloud gateway 505 in a public cloud 510, and a SaaS datacenter 526 with resources 556 and an SD-WAN gateway forwarding node 536. FIG. 5 will be described below with reference to FIG. 6.

FIG. 6 illustrates a process 600 performed by an edge forwarding node of a branch site serving as a hub forwarding node to relay communications between other sites internal and external to the virtual network in some embodiments. The process 600 starts, at 610, when an edge forwarding node (i.e., a first edge forwarding node) of a branch site receives instructions from a controller to serve as a hub forwarding node to relay a set of packets from a particular forwarding node at a particular site to a destination. For example, in the virtual network 500, the edge forwarding node 530 at the branch site 520 can establish a communications session with the edge forwarding node 534 at the branch site 524 in order to have the edge forwarding node 534 serve as a hub for relaying a set of packets from the edge forwarding node 530 to the gateway forwarding node 536 following a number of failed attempts to communicate through the cloud gateway 505, in some embodiments. In some embodiments, the instructions include route records generated by the controller based on routes identified in one or more routing graphs for the SD-WAN.

Following receipt of the instructions at 610, the edge forwarding node establishes, at 620, a first tunnel with the particular forwarding node of the particular site and a second tunnel with a next hop on the path to the destination in order to relay the set of packets from the particular forwarding node to the destination. For example, the edge forwarding node 532 can establish a tunnel with the edge forwarding node 530 via the link 570, and a tunnel with the gateway forwarding node 536 (i.e., destination) on the link 572.

The edge forwarding node next receives, at 630, packets from the particular forwarding node along the first tunnel, removes an identifier of the first tunnel from the packets, and inserts an identifier of the second tunnel. The edge forwarding node then forwards, at 640, the packets having the identifier of the second tunnel through the second tunnel to the destination. For example, the edge forwarding node 534 can receive packets from the edge forwarding node 530 and forward the packets to the destination gateway forwarding node 536 along the path illustrated by the dashed line 574.

Next, at 650, the edge forwarding node determines whether there are additional packets in the set of packets to be forwarded. When the edge forwarding node determines that there are additional packets to forward in the communications session (i.e., the session has not yet terminated), the process returns to 630 to receive the packets from the particular forwarding node.

Otherwise, when the edge forwarding node determines there are no additional packets to forward (i.e., the communications session has terminated), the process transitions to 660 to terminate the first and second tunnels and cease serving in the role as a hub according to the received instructions. For example, in some embodiments, the edge forwarding node operating in a hub role is configured to only remain in that role as the hub for the length of time it takes to relay the set of packets for which the tunnel was initially established, while in other embodiments, the edge forwarding node continues to operate in the hub role for a particular set of communications sessions, or in still other embodiments, the edge forwarding node operates in the hub role until it receives additional instructions (e.g., from the controller) to stop. Following 660, the process ends.

FIG. 7 illustrates another example of a virtual network in some embodiments. The virtual network 700 includes a controller cluster 740, a set of branch sites (e.g., 720, 722, and 724) that each include a set of resources (e.g., 750, 752, and 754) and an SD-WAN edge forwarding node (e.g., 730, 732, and 734), and a datacenter 728 that includes resources 758 and a hub forwarding node 738. The hub forwarding node 738 at the datacenter 728 serves to connect each of the branch sites 720-724 to the gateway forwarding node 736 of the external SaaS datacenter 726 to allow the branch sites to access resources 756 of the SaaS datacenter. FIG. 7 will be described in further detail below with reference to FIG. 8.

FIG. 8 illustrates a process performed by a controller or controller cluster in some embodiments. The process 800 is performed as a reactive process in some embodiments (i.e., in response to detection of poor conditions in the SD-WAN), while in other embodiments, the process is a proactive process (i.e., performed prior to any detection of poor conditions). The process 800 starts at 810 when the controller generates a routing graph (e.g., routing-mesh topology model) based on profile settings of SD-WAN forwarding nodes in order to identify available routes between devices in and out of the SD-WAN. For example, the controller cluster 740 may identify all of the connections 760 between the branch sites 720-724 and the datacenter 728, as well as the connections 765 between the branch sites. An example routing graph will be described below with reference to FIGS. 11A-11G.

Next, the controller analyzes, at 820, the routing graph to identify spoke SD-WAN edge forwarding nodes. In the virtual network 700, the controller cluster 740 may identify each of the edge forwarding nodes 730-734 as spokes around the hub forwarding node 738. Based on the analysis, the controller determines, at 830, that a particular spoke SD-WAN edge forwarding node should serve as an SD-WAN hub forwarding node for a group of SD-WAN edge forwarding nodes. For example, though each of the edge forwarding nodes 730-734 have been identified as spokes, the controller 740 in some embodiments may determine that the optimal route for the edge forwarding nodes 730 and 734 (e.g., in case these nodes are unable to reach the hub forwarding node 738 directly) would be through the edge forwarding node 732 as illustrated by the bold routes 770 and 775.

After determining that the particular spoke edge forwarding node should serve as a hub forwarding node for a group of edge forwarding nodes, the controller instructs, at 840, the particular spoke edge forwarding node to serve as a hub forwarding node for the group of SD-WAN edge forwarding nodes, and instructs the group to use the particular spoke edge forwarding node as a hub forwarding node. For example, the controller cluster 740 can use the connections 780 to send respective instructions to each of the edge forwarding nodes 730-734. In some embodiments, the controller instructs the group of edge forwarding nodes to use the designated hub forwarding node only for a specified amount of time (e.g., for a particular set of communications sessions).

The instructions, in some embodiments, include route records generated by the controller that identify different paths using the particular spoke edge forwarding node as a hub forwarding node. In some embodiments, the route records include two different sets of route records generated based on first and second routing graphs, with the first set including routes where the particular spoke edge forwarding node only serves as an edge forwarding node, and the second set including routes where the particular spoke edge forwarding node serves as an edge forwarding node and as a hub forwarding node. Alternatively, or conjunctively, the route records in some embodiments include two different sets of route records based one routing graph generated by the controller, with the first set of route records further based on a first set of routes associated with a first cost when using the particular spoke edge forwarding node as an edge forwarding node, and the second set of route records further based on a second set of routes associated with a second cost when using the particular spoke edge forwarding node as a hub forwarding node. In some embodiments, the controller also sends with the route records a list of nodes identified in the routing graph as nodes that can serve as hubs to the forwarding nodes in the SD-WAN. After providing the instructions to the particular spoke edge forwarding node, the process 800 ends.

FIG. 9 illustrates an example of a communications session between sites in different SD-WANs that is relayed by an edge forwarding node. The first SD-WAN 901, includes a set of branch sites (e.g., 920, 921, and 922) each with a set of resources (e.g., 950, 951, and 952) and an edge forwarding node (e.g., 930, 931, and 932), as well as a cloud gateway 905 in a public cloud 910. The second SD-WAN 902 includes a pair of branch sites (e.g., 924 and 925) each with a set of resources (e.g., 954 and 955) and an edge forwarding node (e.g., 934 and 935). The first and second SD-WANs 901 and 902 are connected by a public datacenter 926 that includes a set of resources 956 and a hub forwarding node 936. FIG. 9 will be further described below with reference to FIG. 8.

FIG. 10 illustrates a process performed by a controller or controller cluster in some embodiments to facilitate routing between forwarding nodes internal and external to an SD-WAN. The process 1000 starts at 1010 when the controller detects degraded performance at a designated hub forwarding node between a source site and a destination site. For example, a controller cluster (not pictured) for the SD-WAN 901 may detect that the performance of the cloud gateway 905, and/or the link 960 between the edge forwarding node 931 and the cloud gateway 905, is degraded. In some embodiments, the controller cluster detects such network events by receiving notifications from the different forwarding elements (e.g., edge forwarding node 931, cloud gateway 905, etc.) regarding the network events.

Next, the controller generates, at 1020, a routing graph (i.e., the routing graph generated in the process 800) to perform path search to identify alternate routes between the source and destination sites through the SD-WAN that use a particular edge forwarding node at a particular site as a next hop (i.e., instead of the designated hub forwarding node) for the set of packets. For example, a controller cluster (not pictured) for the SD-WAN 901 may identify the edge forwarding node 930 as a spoke edge forwarding node able to serve as a hub for a communications session between the edge forwarding node 931 in the SD-WAN 901 and a destination, such as the edge forwarding node 934 of the branch site 924 in the SD-WAN 902.

The controller cluster then selects, at 1030, the optimal route from the identified alternate routes for forwarding the set of packets from the source site to the destination site. In some embodiments, each route has an associated cost, and the selected optimal route is the route having the lowest cost, while in other embodiments, the optimal route is not the route having the lowest cost.

The controller cluster instructs, at 1040, the particular edge forwarding node used as a next hop in the selected route to serve as a hub forwarding node to forward the set of packets from the source site to the destination site. For example, a controller cluster (not pictured) can instruct the edge forwarding node 930 to serve as a hub for the edge forwarding node 931 in order for the edge forwarding node 931 to forward the set of packets to the edge forwarding node 934 in the second SD-WAN 902, such that the packets are forwarded from the edge forwarding node 930 serving as a hub, to the hub forwarding node 936 of the datacenter 926, and finally to the edge forwarding node 934.

Additionally, the controller cluster instructs, at 1050, an edge forwarding node at the source site to use the particular edge forwarding node at the particular site as a next hop for forwarding the set of packets. In some embodiments, the controller cluster instructs the edge forwarding node to use the particular edge forwarding node as a next hop only for the set of packets, while in other embodiments, the controller cluster instructs the edge forwarding node to use the particular edge forwarding node as a next hop for additional sets of packets. The process then ends.

In some embodiments, the cloud gateway 905 performs some or all of the functionalities of the controller cluster described above. For example, in some embodiments, the cloud gateway is responsible for collecting network event-related data from other forwarding elements connected by the SD-WAN and provides this data to the controller cluster, while in other embodiments, the cloud gateway collects the data, analyzes the data to detect any problems, and provides solutions (e.g., by providing alternate routes for forwarding packets).

While the processes in FIGS. 3-10 are described with reference to the elements in FIGS. 2-9, the particular destination for each of these processes can be any of an SD-WAN edge forwarding node at a branch site, an SD-WAN gateway forwarding node for a private datacenter, a multi-tenant SD-WAN gateway forwarding node associated with a public cloud, a multi-tenant SD-WAN gateway forwarding node associated with a SaaS provider cloud, or an SD-WAN hub forwarding node that provides connectivity between spoke SD-WAN edge forwarding nodes in a hub-and-spoke configuration of the SD-WAN.

As mentioned above, the controller or controller cluster in some embodiments proactively or reactively creates and examines routing graphs in order to determine routes for packets between SD-WAN edge forwarding nodes. In some embodiments, the controller generates one or more routing graphs to perform path searches to identify routes through the SD-WAN forwarding nodes (e.g., edge nodes, hub nodes, cloud gateway nodes, etc.) between SD-WAN sites that are sources and destinations of packet flows. In some embodiments, the controller also provides a list of forwarding nodes that can be used as hub forwarding nodes to each forwarding node in the SD-WAN. Additional details regarding generating routing graphs and performing path searches on those routing graphs for identifying paths through the SD-WAN can be found in U.S. Pat. No. 11,005,684.

FIGS. 11A-11G illustrate an example of a routing graph generated by a controller, along with a subset of potential desirable paths transposed on the routing graph from which the controller can select one or more edge forwarding nodes to operate in a secondary function as hub forwarding nodes. While the routing graph generation and analyses are described below as being performed by the controller, some or all of these functionalities, in some embodiments, are instead performed by the cloud gateway.

FIG. 11A illustrates a routing graph 1100 generated by a controller to identify nodes in a virtual network and the connections between them. The routing graph 1100 includes five edge forwarding nodes (e.g., 1110, 1112, 1114, 1116, and 1118), a gateway forwarding node 1120, and a hub forwarding node 1122. Additionally, the routing graph includes a node 1138 representing an external corporate compute node (e.g., a branch office or datacenter) or SaaS provider accessible through edge forwarding node 1118, and a set of nodes 1130, 1132, 1134, and 1136 representing machines or groups of machines at branch sites served by the edge forwarding nodes 1110-1118. For example, the nodes 1130 and 1132 represent machines that are accessible through edge forwarding node 1110, node 1134 represents machines that are accessible through edge forwarding node 1114, and node 1136 represents machines that are accessible through edge forwarding node 1116.

The routing graph 1100 also illustrates the connections between these forwarding nodes, including links 1140 between edge forwarding nodes, links 1142 between edge forwarding nodes and the gateway forwarding node 1120, links 1144 between edge forwarding nodes and the hub forwarding node 1122, and a link 1146 between the gateway forwarding node 1120 and hub forwarding node 1122. In some embodiments, the controller removes any identified bad links before generating the routing graph 1100.

As described in relation to the process 800, the controller can analyze the routing graph to identify spoke SD-WAN edge forwarding nodes, such as spoke edge forwarding nodes 1110-1118, and determine whether any of the identified spoke edge forwarding nodes should serve as hub forwarding nodes for other edge forwarding nodes. For example, the edge forwarding node 1112 has a connection via a link 1144 to the hub forwarding node 1122, and thus the edge forwarding node 1112 can act as a hub forwarding node for the edge forwarding node 1110 if the connection link 1142 between edge forwarding node 1110 and gateway forwarding node 1120 becomes unreliable. Each node that exists as a hub or spoke in the routing graph 1100 is also illustrated with a cost label indicative of the cost of using each respective node in their primary role (e.g., edge forwarding node 1110 has an associated cost 1 (“E1−C1”), and edge forwarding node 1116 has an associated cost 1 (“E4−C1”)).

In some embodiments, for one or more links in the routing graph, the controller computes a link weight score (cost score) as a weighted combination of several computed and provider-specific values. In some embodiments, the weight score is a weighted combination of the link's (1) computed delay value, (2) computed loss value, (3) provider network-connection cost, and (4) provider compute cost. In some embodiments, the provider compute cost is accounted for as the managed forwarding nodes connected by the link are machines (e.g., virtual machines or containers) that execute on host computers in the public cloud datacenter(s). These weight scores, in some embodiments, can be used to determine which edge forwarding nodes would be best suited to serve in their secondary function as hub forwarding nodes.

For example, FIG. 11B illustrates the routing graph 1100 with weight scores added to the links for use by the controller to determine the most desirable routes between a source node (e.g., emphasized edge forwarding node 1110) and a destination node (e.g., emphasized gateway forwarding node 1136). For example, the link between edge forwarding node 1110 and gateway forwarding node 1120 has a weight value of L−C1 (i.e., link cost 1), while the link between the edge forwarding node 1110 and the edge forwarding node 1112 has a weight value of L−C2 (i.e., link cost 2). It can be assumed, in some embodiments, that the cost of a link between an edge forwarding node and a designated gateway (e.g., L−C1) under normal conditions is less than the cost of a link between a first edge forwarding node and a second edge forwarding node that is operating in a hub forwarding node role (e.g. L−C2).

In addition to the weight values associated with each link, and the initial cost scores for each of the nodes, edge forwarding nodes 1112, 1114, and 1118 include secondary cost scores representative of the cost of using each of these particular edge forwarding nodes in their secondary functions as hub forwarding nodes (e.g., edge forwarding node 1112 includes a secondary cost E2−H−C1). In some embodiments, it can be assumed that an edge forwarding node's cost score for when the node is operating in its primary function as an edge forwarding node is less than the cost score for when the edge forwarding node is operating in its secondary function as a hub forwarding node. In some such embodiments, it can also be assumed that under normal operating conditions, the cost score for when the edge forwarding node is operating in its secondary function as a hub forwarding node is greater than the cost score associated with a designated hub forwarding node.

FIG. 11C illustrates the routing graph 1100 over which a first desirable path between the edge forwarding node 1110 and the edge forwarding node 1116 is transposed, represented by the emphasized and labeled links. In this example, each of the forwarding nodes through which traffic would traverse has a cost associated with the primary function of the forwarding node (i.e., none of the edge forwarding nodes in this example are operating as hub forwarding nodes). Thus, the cost of using this particular path is less than the cost of other potential paths, in some embodiments.

FIG. 11D illustrates the routing graph 1100 over which a second desirable path between the edge forwarding node 1110 and the edge forwarding node 1116 is transposed. In this example, one edge forwarding node (i.e., edge forwarding node 1118) is operating as a hub forwarding node in order to pass traffic from the gateway 1120 to the edge forwarding node 1116.

The decision to augment the role of an edge forwarding node, in some embodiments, is based on a condition faced by another forwarding node that results in that other forwarding node being unable to forward traffic to an intended next hop. For example, a particular forwarding node may be unable to connect to a hub forwarding node due to link degradation, congestion at the hub forwarding node because of another tenant, etc., according to some embodiments. In another example, the controller (or cloud gateway) in some embodiments can detect these conditions by pinging (e.g., sending ICMP messages) a hub forwarding node or set of hub forwarding nodes and detecting a slow response.

In some embodiments, the condition faced by a forwarding node is associated with a specified threshold, such as bandwidth thresholds, connection attempt thresholds (i.e., the number of failed attempts by a forwarding node to connect to another forwarding node), response time thresholds (i.e., how quickly a forwarding node responds to an ICMP message), etc. For example, the decision to augment the role of the edge forwarding node 1118 so that it operates as a hub forwarding node is based on a threshold number of failed connection attempts being exceeded when the gateway forwarding node 1120 tries to connect to the hub forwarding node 1122, in some embodiments. As mentioned above, the failed attempts could be due to congestion caused by heavy traffic from other tenants that use the hub forwarding node 1122, in some embodiments.

As a result of the congestion (or another condition), the controller in some embodiments determines that the cost of using the hub forwarding node 1120 becomes much greater than the cost of using the edge forwarding node 1118 as a hub forwarding node to deliver the traffic to its destination. Alternatively, or conjunctively, the forwarding nodes that experience the conditions make their own alternate route selections using route records provided by the controller (or cloud gateway), according to some embodiments.

In some embodiments, the forwarding nodes make their selections according to policy-based routing (PBR) rules. In some such embodiments, the forwarding nodes include metric generators that generate metrics for resolving the PBR rules. For example, a PBR rule can specify for a source (e.g., a branch office in Los Angeles) that if the traffic destination is X (e.g., a branch office in San Francisco), then the next hop is Y (e.g., a branch office in Fresno) if Y's delay is within 80% of a specified ideal range, and otherwise, the next hop is Z (e.g., a branch office in Las Vegas). Thus, if the edge forwarding node located at the source site determines that Y's delay is not within the range, the edge forwarding node would use Z as its next hop.

FIG. 11E illustrates the routing graph 1100 over which a third desirable path between the edge forwarding node 1110 and the edge forwarding node 1116 is transposed. Like the example of FIG. 11D, this example includes one edge forwarding node, this time edge forwarding node 1112, that is operating as a hub forwarding node in order to pass traffic from the edge forwarding node 1110 to the hub forwarding node 1122 for eventual delivery to the destination 1116. As the gateway 1120 is a multi-tenant forwarding node like the hub forwarding node 1122, heavy traffic from another tenant could bog down the gateway forwarding node 1120, thus creating a need for an alternate route and off-setting the normally higher cost of using the edge forwarding node 1112 in lieu of the gateway 1120.

FIG. 11F illustrates the routing graph 1100 over which a fourth desirable path between the edge forwarding node 1110 and the edge forwarding node 1116 is transposed. This fourth path uses the secondary hub functionalities of both the edge forwarding node 1112 and the edge forwarding node 1118. Unlike the examples in FIGS. 11C-11E, the example path in FIG. 11F includes an additional node for the traffic to traverse. It can be deduced that the extra cost of traversing the extra node, in addition to the extra cost of two edge forwarding nodes operating in their secondary functionalities as hub forwarding nodes, is now less than the cost of using the direct link between edge forwarding node 1110 and the gateway 1120 plus the cost of traversing the hub forwarding node 1122, according to some embodiments.

Lastly, FIG. 11G illustrates the routing graph 1100 over which a fifth desirable path (and least desirable of the 5 illustrated) between the edge forwarding node 1110 and the edge forwarding node 1116 is transposed. In this example, two edge forwarding nodes (e.g., 1114 and 1118) are again operating as hub forwarding nodes.

In some embodiments, the cost of using the path illustrated in FIG. 11F may be equal to the path illustrated in FIG. 11G, and other means to determine the best path may be used in lieu of cost. For example, in some embodiments, the controller may associate forwarding nodes with heuristic metrics, such as geolocation, the number of paths to get to a hub, and other path metrics. In some embodiments, the path in FIG. 11F may be more desirable, and less expensive, than the path in FIG. 11G based on the potential for additional traffic to edge forwarding node 1114, which provides access to the gateway forwarding node 1134 of an external site. While the example paths provided above are limited, the controller in some embodiments identifies every potential path between a source and destination, and selects the best path.

As mentioned above, different embodiments generate and utilize routing graphs differently. For instance, some embodiments only define one routing graph but allow edge nodes to serves as either edge forwarding nodes or as hub forwarding nodes by providing two different costs for each such edge node for the two different capacities under which it could operate (i.e., a first cost when it operates as an edge forwarding node and a second cost when it operates as a hub forwarding node). These embodiments then perform path searches on this common routing graph to conjunctively identify for pairs of sites connected by the SD-WAN (1) routes that use a particular edge node as only an edge forwarding element and (2) routes that also use the particular edge node as a hub forwarding element.

Other embodiments, on the other hand, define two routing graphs with one routing graph not treating any edge forwarding node as a hub node, while the other routing graph allows the edge nodes to be edge forwarding nodes and hub forwarding nodes for some or all other edge nodes. These embodiments perform path searches on each routing graph to identify optimal routes between each pair of sites connected by the SD-WAN. FIG. 12 illustrates an example of two routing graphs 1200 a and 1200 b generated for an SD-WAN that treat one edge node 1212 (“E2”) differently. In graph 1200 a, the edge node 1212 is designated only with the acronym EFE to identify that it only operates as an edge forwarding element. As such, in this routing graph, node 1212 cannot be used to define routes from node 1210 to node 1214 (i.e., via link 1240), and instead all possible routes must pass through the hub node 1220 and/or the cloud gateway node 1222, as highlighted by the overlaid example routes 1250 a and 1250 b.

In the second graph 1200 b, the edge node 1212 is designated with both the acronyms EFE and HFE to identify that it can operate as an edge forwarding element and a hub forwarding element. As such, in this routing graph, node 1212 can be used to define routes from node 1210 to node 1214 (i.e., via link 1240) as highlighted by the overlaid routes 1252 a and 1252 b that are shown from node 1210 to node 1214 through the node 1212. In some embodiments, different costs are associated with the node 1212 acting as an EFE or HFE, as described above with reference to FIGS. 11A-11G.

Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium). When these instructions are executed by one or more processing unit(s) (e.g., one or more processors, cores of processors, or other processing units), they cause the processing unit(s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, RAM chips, hard drives, EPROMs, etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.

In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage, which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the invention. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.

FIG. 13 conceptually illustrates a computer system 1300 with which some embodiments of the invention are implemented. The computer system 1300 can be used to implement any of the above-described hosts, controllers, gateway and edge forwarding elements. As such, it can be used to execute any of the above described processes. This computer system includes various types of non-transitory machine readable media and interfaces for various other types of machine readable media. Computer system 1300 includes a bus 1305, processing unit(s) 1310, a system memory 1325, a read-only memory 1330, a permanent storage device 1335, input devices 1340, and output devices 1345.

The bus 1305 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the computer system 1300. For instance, the bus 1305 communicatively connects the processing unit(s) 1310 with the read-only memory 1330, the system memory 1325, and the permanent storage device 1335.

From these various memory units, the processing unit(s) 1310 retrieve instructions to execute and data to process in order to execute the processes of the invention. The processing unit(s) may be a single processor or a multi-core processor in different embodiments. The read-only-memory (ROM) 1330 stores static data and instructions that are needed by the processing unit(s) 1310 and other modules of the computer system. The permanent storage device 1335, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when the computer system 1300 is off. Some embodiments of the invention use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the permanent storage device 1335.

Other embodiments use a removable storage device (such as a floppy disk, flash drive, etc.) as the permanent storage device. Like the permanent storage device 1335, the system memory 1325 is a read-and-write memory device. However, unlike storage device 1335, the system memory is a volatile read-and-write memory, such as random access memory. The system memory stores some of the instructions and data that the processor needs at runtime. In some embodiments, the invention's processes are stored in the system memory 1325, the permanent storage device 1335, and/or the read-only memory 1330. From these various memory units, the processing unit(s) 1310 retrieve instructions to execute and data to process in order to execute the processes of some embodiments.

The bus 1305 also connects to the input and output devices 1340 and 1345. The input devices enable the user to communicate information and select commands to the computer system. The input devices 1340 include alphanumeric keyboards and pointing devices (also called “cursor control devices”). The output devices 1345 display images generated by the computer system. The output devices include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD). Some embodiments include devices such as touchscreens that function as both input and output devices.

Finally, as shown in FIG. 13, bus 1305 also couples computer system 1300 to a network 1365 through a network adapter (not shown). In this manner, the computer can be a part of a network of computers (such as a local area network (“LAN”), a wide area network (“WAN”), or an Intranet), or a network of networks (such as the Internet). Any or all components of computer system 1300 may be used in conjunction with the invention.

Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media). Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM), recordable compact discs (CD-R), rewritable compact discs (CD-RW), read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a variety of recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.), flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.), magnetic and/or solid state hard drives, read-only and recordable Blu-Ray® discs, ultra-density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.

While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some embodiments are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs). In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself.

As used in this specification, the terms “computer”, “server”, “processor”, and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms “display” or “displaying” mean displaying on an electronic device. As used in this specification, the terms “computer readable medium,” “computer readable media,” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral or transitory signals.

While the invention has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention. For instance, several of the above-described embodiments deploy gateways in public cloud datacenters. However, in other embodiments, the gateways are deployed in a third party's virtual private cloud datacenters (e.g., datacenters that the third party uses to deploy cloud gateways for different entities in order to deploy virtual networks for these entities). Thus, one of ordinary skill in the art would understand that the invention is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims. 

The invention claimed is:
 1. A method for dynamically adjusting software defined wide area network (SD-WAN) edge forwarding node roles for a group of edge forwarding nodes in an SD-WAN defined for an entity, the SD-WAN comprising (i) at least one datacenter site comprising a hub forwarding node and a plurality of server machines and (ii) two or more multi-user compute sites each comprising one edge forwarding node to connect multiple user machines at their respective sites to the SD-WAN, the method comprising: collecting network event data from the at least one datacenter and the two or more multi-user compute sites; detecting that a first edge forwarding node at a first multi-user compute site of the two or more multi-user compute sites is experiencing a problem forwarding a particular set of packets; based on the detected problem, generating a set of route records identifying a set of alternate routes for use by the first edge forwarding node, the set of alternate routes comprising at least one alternate route in which a second edge forwarding node at a second multi-user compute site serves as a hub forwarding node for forwarding the particular set of packets; and distributing different subsets of the generated set of route records to forwarding nodes in the SD-WAN for use in forwarding the particular set of packets.
 2. The method of claim 1, wherein the generated set of route records is a second generated set of route records that is an updated version of a first generated set of route records provided to the forwarding nodes prior to detecting that the first edge forwarding node is experiencing a problem.
 3. The method of claim 1, wherein the detected problem comprises one of congestion at a particular forwarding node, slow response by the particular forwarding node, and downtime experienced by the particular forwarding node.
 4. The method of claim 3, wherein the detected problem is associated with a specified threshold value.
 5. The method of claim 3, wherein: the entity is a first tenant of a plurality of tenants; the hub forwarding node at the datacenter site is a multi-tenant hub forwarding node that serves the plurality of tenants; the detected problem comprises congestion at the multi-tenant hub forwarding node; and the congestion is caused by heavy traffic from a second tenant that uses the multi-tenant hub forwarding node.
 6. The method of claim 1, wherein the method is performed by a controller for the SD-WAN, wherein collecting network event data from the at least one datacenter and the two or more multi-user compute sites comprises monitoring a set of links that connect the controller to forwarding nodes in the SD-WAN for notifications from the forwarding nodes regarding problems experienced by the forwarding nodes.
 7. The method of claim 6, wherein detecting that the first edge forwarding node is experiencing the problem forwarding the particular set of packets comprises analyzing a notification received from the first edge forwarding node.
 8. The method of claim 6, wherein at least a subset of the controller's functionalities is performed by a cloud gateway.
 9. The method of claim 6, wherein the controller is a cloud gateway.
 10. The method of claim 1, wherein generating the set of route records comprises: generating at least one routing graph for identifying multiple routes between forwarding nodes for forwarding the particular set of packets; using the at least one routing graph to perform a set of path searches to identify the set of alternate routes; and generating the set of route records to implement the identified alternate set of routes.
 11. The method of claim 10, wherein each edge forwarding node in the SD-WAN is associated with a set of SD-WAN profiles, each SD-WAN profile identifying at least one of a shared set of security, service, and policy parameters.
 12. The method of claim 11, wherein using the at least one routing graph to perform the set of path searches comprises using the set of SD-WAN profiles to identify one or more edge forwarding nodes to serve as hub forwarding nodes for the SD-WAN.
 13. The method of claim 1, wherein the second edge forwarding node only serves as a hub forwarding node for the first multi-user compute site to forward the particular set of packets.
 14. The method of claim 1, wherein the second edge forwarding node serves as a hub forwarding node for the first multi-user compute site and at least one other multi-user compute site in the SD-WAN.
 15. The method of claim 1, wherein the second edge forwarding node establishes at least one tunnel with the first edge forwarding node, the tunnel used to receive the particular set of packets for forwarding to sites other than the first and second multi-user compute sites.
 16. The method of claim 15, wherein the tunnel is a secure tunnel.
 17. The method of claim 1, wherein each route in the set of alternative routes is associated with a respective cost, wherein routes that use the second edge forwarding node as a hub forwarding node have a first cost and routes that use the second edge forwarding node as an edge forwarding node have a second cost that is different than the first cost.
 18. The method of claim 1, wherein the group of edge forwarding nodes comprises at least one of an edge forwarding node associated with a branch site of the SD-WAN, an SD-WAN gateway forwarding element (FE) for a private datacenter, a multi-tenant SD-WAN gateway FE associated with a public cloud, a multi-tenant SD-WAN gateway FE associated with a Software as a Service (SaaS) provider cloud, and a hub forwarding node that provides connectivity between spoke edge forwarding nodes in a hub-and-spoke configuration of the SD-WAN.
 19. The method of claim 1, wherein each edge forwarding node in the group of edge forwarding nodes serve as spoke nodes in a hub-and-spoke architecture that uses the hub forwarding node at the datacenter site. 